package com.example.gcdemo;

import com.example.gcdemo.gcc.HelloGCUtil;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

import java.time.LocalDateTime;

/**
 * @author chaird
 * @create 2020-12-25 21:28
 */
@SpringBootApplication
@RestController
public class App {

  public static void main(String[] args) {
    SpringApplication.run(App.class, args);
  }

  @GetMapping("/demo1")
  public Object demo1() {

    for (int i = 0; i < 10000; i++) {
      byte[][] data = new byte[10][10];
    }
    return LocalDateTime.now().toString();
  }

  @GetMapping("/demo2")
  public Object demo2() throws Exception{
    HelloGCUtil.run();
    return LocalDateTime.now().toString();
  }

}
